package com.yenlien.traceyun.business.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 客户订单
 *
 * @author master yi
 */
@Entity
@Table(name = "t_clientorder")
public class ClientOrder extends TraceEntity {

    /**
     * 应用id
     */
    @Column(name = "app_id", length = 32)
    private String appId;

    // 付款凭证 pdf 文件
    private String pdf;

    /**
     * 订单号
     */
    @Column(name = "order_no", length = 30, unique = true)
    private String orderNo;


    /**
     * 付款状态(0待付款；1：首付款；2：已全款)
     */
    @Column(name = "pay_status", length = 1)
    private int payState;

    /**
     * 发货状态(0待发货；1：已发货)
     */
    @Column(name = "deliver_status", length = 1)
    private int deliverState;

    private String time;     // 发货时间
    private String way;     // 发货方式
    private String logistics;     // 物流公司


    /**
     * 客户ID
     */
    @Column(name = "client_id", length = 32)
    private String clientId;

    /**
     * 客户名称
     */
    @Column(name = "client_name", length = 30)
    private String clientName;

    /**
     * 交货时间
     */
    @Column(name = "deliver_time", length = 30)
    private String deliverTime;

    /**
     * 销售员
     */
    @Column(name = "sales_person", length = 32)
    private String salesperson;

    /**
     * 订单来源
     */
    @Column(name = "source", length = 10)
    private String source;

    /**
     * 收货人
     */
    @Column(name = "consignee", length = 20)
    private String consignee;

    /**
     * 收货人电话
     */
    @Column(name = "phone", length = 13)
    private String phone;

    /**
     * 收货人地址
     */
    @Column(name = "address", length = 50)
    private String address;

    /**
     * 发票id
     */
    @Column(name = "invoice_id")
    private int invoiceId;


    /**
     * 付款方式
     */
    @Column(name = "pay_type", length = 10)
    private String payType;

    /**
     * 付款金额
     */
    @Column(name = "pay_amount", length = 11)
    private BigDecimal payAmount;

    /**
     * 总金额
     */
    @Column(name = "total_amount", length = 11)
    private BigDecimal totalAmount;

    /**
     * 收款时间
     */
    @Column(name = "receive_time")
    private String receiveTime;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getWay() {
        return way;
    }

    public void setWay(String way) {
        this.way = way;
    }

    public String getLogistics() {
        return logistics;
    }

    public void setLogistics(String logistics) {
        this.logistics = logistics;
    }

    public String getPdf() {
        return pdf;
    }

    public void setPdf(String pdf) {
        this.pdf = pdf;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public int getPayState() {
        return payState;
    }

    public void setPayState(int payState) {
        this.payState = payState;
    }

    public int getDeliverState() {
        return deliverState;
    }

    public void setDeliverState(int deliverState) {
        this.deliverState = deliverState;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getDeliverTime() {
        return deliverTime;
    }

    public void setDeliverTime(String deliverTime) {
        this.deliverTime = deliverTime;
    }

    public String getSalesperson() {
        return salesperson;
    }

    public void setSalesperson(String salesperson) {
        this.salesperson = salesperson;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getInvoiceId() {
        return invoiceId;
    }

    public void setInvoiceId(int invoiceId) {
        this.invoiceId = invoiceId;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }


    public String getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(String receiveTime) {
        this.receiveTime = receiveTime;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }
}
